/**
 * Copyright (c) 2024-2025 National Fundamental Software of China Co., Ltd.
 *
 * You should have find a copy of NFSChina License. If not, please contact us
 * by email <os_support@nfschina>
 *
**/

import QtQuick 2.7
import QtQuick.Controls 2.0 as QQC2
import QtQuick.Layouts 1.3 as Layouts
import QtQuick.Window 2.15

import org.kde.kcm 1.1 as KCM
import org.kde.kirigami 2.14 as Kirigami
import org.kde.kquickcontrols 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
QQC2.Switch {
    id: control

    indicator: Rectangle {
        id:smallRect
        implicitWidth: 36
        implicitHeight: 20
        radius: 10
        color: control.checked ? PlasmaCore.Theme.highlightColor : "#808080"
        Rectangle {
            id : smallBall
            width: 16
            height: 16
            radius: 8
            anchors.verticalCenter: parent.verticalCenter
            x: control.checked ? smallRect.width - smallBall.width - 1 : 1
            Behavior on x {
                NumberAnimation { 
                    id:switchanimation
                    duration: 0
                }
            }
        }
    }
}